<%-- 
    Document   : search_visit
    Created on : May 2, 2014, 11:57:32 AM
    Author     : Mansur
--%>

<%@ include file="/WEB-INF/jsp/include/page_header.jspf" %>
<%@ taglib prefix="display" uri="http://displaytag.sf.net"%>
<%@page contentType="text/html" pageEncoding="ISO-8859-1"%>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
        <title>.: Ship Visit :.</title>    
        <script type="text/javascript" src="${pageContext.request.contextPath}/js/jquery.blockUI.js"></script>   
        <script type="text/javascript">
            
        </script>
    </head>
    <body>
        <s:useActionBean beanclass="exatrez.stripes.util.ListUtil" var="list"/>
        <s:form beanclass="exatrez.stripes.action.ShipVisit3FlowAction" name="form1">            
        <fieldset>
        <div>
                <fieldset>
                    <div id="page-title">
                        <span class="title">Ship Visit - History staff visited</span>
                    </div>
                    <s:messages/>
                    <s:errors/>
                    <table border="0" align="center" width="50%">
                        <tr>
                            <td style="vertical-align: top; text-align: left;" colspan="7">
                                <s:submit name="searchStaffVisit" value="Back" class="btn" />
                            </td>
                        </tr>
                        <tr>
                            <td width="25%" style="vertical-align: top; text-align: right;"><b>Staff ID</b></td>
                            <td width="1%" style="vertical-align: top; text-align: left;"><b>:</b></td>
                            <td width="23%" style="vertical-align: top; text-align: left;">
                                ${actionBean.staffSelected.userId}&nbsp;
                            </td>
                            <td width="5%" style="vertical-align: top; text-align: left;">&nbsp;</td>
                            <td width="25%" style="vertical-align: top; text-align: right;"><b>Current Department</b></td>
                            <td width="1%" style="vertical-align: top; text-align: left;"><b>:</b></td>
                            <td width="23%" style="vertical-align: top; text-align: left;">
                                ${actionBean.staffSelected.department.departmentName}&nbsp;
                            </td>
                        </tr>
                    </table>
                    
                    <div id="page-title">
                        <span class="title">History ship visited as per year ${actionBean.currentYear} for status ${actionBean.statusDesc}</span>
                    </div>
                    <div style="align: center">
                        <display:table class="tablecloth" name="${actionBean.listStaffVisited}" requestURI="/shipVisit3Flow?listStaffVisited" id="line" style="width:100%">
                            <display:column title="No." sortable="true"><center>${line_rowNum}.</center></display:column>
                            <display:column title="Vessel Name" sortable="true" >
                                <a href="shipVisit3Flow?detailStaffVisit&stage=view&idVisit=${line.shipVisit3Id}&statusDesc=${actionBean.statusDesc}&currentYear=${actionBean.currentYear}">${line.vessel.vesselName}</a>
                            </display:column>
                            <display:column title="Date Visit" sortable="true" ><fmt:formatDate value="${line.dateVisit}" pattern="dd/MM/yyyy"/></display:column>
                            <display:column title="Location" sortable="true" property="location"/>
                            <display:column title="Department on Visited" property="departmentCurrent.departmentName" />
                            <%--<display:column title="Summary / Comments" sortable="true" property="summary"/>
                            <display:column title="Attachment" >
                                <c:if test="${!empty(line.listFilteredFile)}" >
                                    <a href="#" onclick="popupWinView('${line.shipVisitFlowId}');return false;">View</a>
                                </c:if>
                            </display:column>--%>
                            <display:column title="Date Submit" sortable="true"><fmt:formatDate value="${line.infoAudit.createDate}" pattern="dd/MM/yyyy hh:mm:ss a"/></display:column>
                            <c:if test="${actionBean.statusDesc eq 'APPROVED'}">
                                <display:column title="Approved By" sortable="true" property="verifierId.userId"/>
                            </c:if>
                            <c:if test="${actionBean.statusDesc eq 'REJECTED'}">
                                <display:column title="Rejected By" sortable="true" property="verifierId.userId"/>
                            </c:if>
                            <display:column title="Comment" sortable="true" property="rejectNote" style="width:250px;" />
                        </display:table>
                    </div>
                </fieldset>
            </div>
            <div>
                <fieldset>
                    <s:submit name="searchStaffVisit" value="Back" class="btn" />
                </fieldset>
            </div>
        </s:form>
    </body>
</html>